<?php
include_once('HTGPage.class.php');
?>
<style type="text/css">
#pickForm {
	float: left;
	margin: 0 auto;
	width: 100%;
	font-weight: bold;
}

#pickForm span {
	font-weight: bold;
	text-decoration: underline;
}

#pickForm fieldset {
	border: 1px solid;
	margin: 2em 0;
	padding: 1em;
}

#pickForm fieldset[name="submitFieldset"] {
	border: 0px;
	margin: 2em 0;
	padding: 1em;
}

#pickForm label {
	display: block;
	float: left;
	clear: left;
	width: 8em;
	padding-right: 1em;
	text-align: right;
	line-height: 1.8em;
	font-weight: bold;
}

#pickForm input {
	display: block;
	float: left;
	margin: 0 0 .5em 0;
}

#pickForm textarea {
	display: block;
	float: left;
	margin: 0 0 .5em 0;
}

br {
	clear: both;
}
</style>
<div>
	<div class="post">
		<div class="title">
			<h2 id="headlineTitleH2">Add a Pick</h2>
			<form method="post" id="pickForm"
				action="<?= $_SERVER['PHP_SELF']; ?>"  onsubmit="return validateForm();" >
				<fieldset name="eventFieldset">
					<legend>Game Details</legend>


					<!-- 				<div> -->
					<!-- 					<span>Choose an existing game:</span> -->
					<!-- 				</div> -->
					<!-- 				<label for="eventId">Game List:</label> -->
					<!-- 				<select -->
					<!-- 					name="eventId"><option value="select">Choose a Game</option> -->
					
					
					
					
					<?php 
//cmondor removed, arash never used.					
// 					$myPage = new HTGPage();
// 					$events = $myPage->myUtils->getRecentEvents();
// 					$eventIds = array();
// 					foreach($events as $i => $event) {
// 						if(!(in_array($event['e_id'], $eventIds))) {
//  							echo '<option value="' . $event['e_id'] . '">' . $event['e_starttime'] . ' ' . $event['e_vis_team'] . '@' . $event['e_home_team'] . '</option>';
// 							array_push($eventIds, $event['e_id']);
// 						}
// 					}
					?>
<!-- 					<option value="2">2011-08-17 15:00:00 Giants@Miami</option> -->
<!-- 					<option value="1">2011-08-15 19:00:00 Jets@Texans</option> -->
<!-- 				</select> <br /><br /> -->
<!-- 				<h1>OR</h1> -->
				<span>Create a new Game:</span><br />
				<label for="sport">Sport:</label><select name="sport"><option
						value="1">Football</option>
				</select> <br /> <label for="league">League:</label><select
					name="league"><option value="1">NFL</option>
					<option value="2">NCAA</option>
				</select> <br /> <label for="gametype">Game Type:</label><select
					name="gametype"><option value="1">Regular Season</option>
					<option value="2">Pre Season</option>
					<option value="3">Post Season</option>
				</select> <br /> <label for="visteam">Visiting Team:</label><input
					type="text" name="visteam" value="" /> <br /> <label
					for="hometeam">Home Team:</label><input type="text"
					name="hometeam" value="" />
				<div>
					<label for="starttime">Start Time:</label>
					<input type="text" id="starttime" name="starttime" value="" />
				</div>
				<br /> 
				<fieldset>
				<legend>Decide When Pick is PUBLIC.</legend>
				<label for="publicdate">Make Public:</label><select name="publicdate">
				<option value="0">NOW</option>
				<option value="5">in 5 minutes</option>
					<option value="10">in 10 minutes</option>
					<option value="15">in 15 minutes</option>
					<option value="s5">5 minutes AFTER GAME START</option>
					<option value="s15">15 minutes AFTER GAME START</option>


			</select> <br /><br /><h2 style="padding-left: 40px;">OR</h2> 
				<div>
					<label for="publicdatedate">Make Public:</label>
					<input type="text" id="publicdatedate" name="publicdatedate" value="" />
				</div>
				</fieldset>
			</fieldset>
				<fieldset name="isHalftimeFieldSet">
					<legend>Half Time Details</legend>
					<div>Is Half Time Pick?</div>
					<label for="htpick">Yes:</label> <input type="radio" name="htpick"
						value="true" Yes /><br /> <label>No:</label><input type="radio"
						name="htpick" value="false" checked />
				</fieldset>

				<fieldset>
					<legend>Pick Details</legend>
					<label for="pick">Pick:</label><input type="text" name="pick"
						value="" /> <br /><input
						type="hidden" name="subject" value="#" /><label
						for="picktext">Pick Text:</label>
					<textarea name="picktext" rows="10" cols="42"></textarea>
				</fieldset>
				<fieldset name="submitFieldset">
					<input type="submit" name="submit" value="submit" />
				</fieldset>
			</form>
		</div>
	</div>
</div>
